Think of a Large Company with different departments: HR, Sales, and IT. Subnetting is how we give each department its own secure floor while keeping everyone in the same building. ðŸ¢
In Day 4, we learned how to find the usable host range, network address, and broadcast address for a single network. Today, we will scale up and find these values for multiple subnets within a larger network.
Before we dive in, you must memorize (or bookmark) this relationship between CIDR, hosts, and subnets:
| CIDR | Total IP Addresses | Number of subnets |
|---|---|---|
| /24 | 256 | 1 |
| /25 | 128 | 2 |
| /26 | 64 | 4 |
| /27 | 32 | 8 |
| /28 | 16 | 16 |
Rule of Thumb: As you move down, the total number of IPs is halved, while the number of subnets doubles (1 → 2 → 4 → 8 → 16).
Goal: Divide 192.168.10.0/24 into 4 subnets.
64 - 2 = 62 (excluding Network and Broadcast addresses).0, 64, 128, 192 (Next would be 256, which is out of range).| Range | Network Address | Broadcast Address | Usable Range |
|---|---|---|---|
| 0 - 63 | 192.168.10.0 |
192.168.10.63 |
192.168.10.1 to 192.168.10.62 |
| 64 - 127 | 192.168.10.64 |
192.168.10.127 |
192.168.10.65 to 192.168.10.126 |
| 128 - 191 | 192.168.10.128 |
192.168.10.191 |
192.168.10.129 to 192.168.10.190 |
| 192 - 255 | 192.168.10.192 |
192.168.10.255 |
192.168.10.193 to 192.168.10.254 |
Goal: Divide the same network into 8 subnets.
| Hosts Range | Network Address | Broadcast Address | Usable Hosts |
|---|---|---|---|
| 0 - 31 | 192.168.10.0 |
192.168.10.31 |
.1 to .30 |
| 32 - 63 | 192.168.10.32 |
192.168.10.63 |
.33 to .62 |
| 64 - 95 | 192.168.10.64 |
192.168.10.95 |
.65 to .94 |
| 96 - 127 | 192.168.10.96 |
192.168.10.127 |
.97 to .126 |
| 128 - 159 | 192.168.10.128 |
192.168.10.159 |
.129 to .158 |
| 160 - 191 | 192.168.10.160 |
192.168.10.191 |
.161 to .190 |
| 192 - 223 | 192.168.10.192 |
192.168.10.223 |
.193 to .222 |
| 224 - 255 | 192.168.10.224 |
192.168.10.255 |
.225 to .254 |
💡 Pro Tip: If a message is destined for a device in the same subnet, the sender "shouts" (broadcasts) it. If it’s for another subnet, it sends it to the Router for delivery.
A Subnet Mask is a 32-bit number used to distinguish the Network part from the Host part of an IP address.
Computers don't "see" IPs the way we do; they only understand binary. To make it human-friendly, engineers created Subnet Masks as an intermediary—think of it as a high-level language for networking.
To find a subnet mask, we count bits from left to right in descending order (starting with all 1s).
Find the Subnet Mask for 192.168.10.0/24.
/24 into the rooms.
11111111.11111111.11111111.000000001s equals 255. All 0s equals 0.
255.255.255.0Find the Subnet Mask for 10.1.1.50/29.
1s).128, 64, 32, 16, 8, 4, 2, 1.128 + 64 + 32 + 16 + 8 = 248.255.255.255.248Find the Subnet Mask for 172.16.0.0/20.
0).128 + 64 + 32 + 16 = 240.255.255.240.0The boring and confusing stuff finally ended! ðŸ˜ðŸ¤£